# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Angel Velasquez <angvp@archlinux.org> 
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Daniel Bainton <dpb [at] backarrow.org>

pkgname=ncmpc
pkgver=0.32
pkgrel=1
pkgdesc='Fully featured MPD client using ncurses'
url='https://www.musicpd.org/clients/ncmpc/'
arch=('x86_64')
license=('GPL')
depends=('ncurses' 'libmpdclient' 'boost-libs')
optdepends=('python2: to enable lyrics plugin'
            'ruby: to enable lyrics plugin')
makedepends=('meson' 'python-sphinx' 'boost')
validpgpkeys=('0392335A78083894A4301C43236E8A58C6DB4512')
source=("https://www.musicpd.org/download/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"{,.sig})
sha256sums=('085c85f4c68e4d4c643faa140bf3f118f191011ccc395a37f4be70c56ec001ac'
            'SKIP')

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	sed "s/curses == 'ncursesw'/false/g" -i meson.build
}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	arch-meson . build -Dlyrics_screen=true --mandir /usr/share
	ninja -C build
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	DESTDIR="${pkgdir}" ninja -C build install
}
